<as-split direction="vertical" unit="pixel" [disabled]="true" gutterSize="0">
  <as-split-area class="flex-fixed" style="padding: 10px;" [size]="40">
    <nz-card [nzHoverable]="true" [nzBordered]="false">
      <div nz-row>
        <!-- <div nz-col [nzSpan]="16">
          <div nz-col [nzSpan]="12">
            <app-school-select style="width:100%"></app-school-select>
          </div>
          <div nz-col [nzSpan]="12">
            <app-major-select style="width:100%"></app-major-select>
          </div>
        </div> -->
        <form nz-form>
          <nz-form-item class="mb-md">
            <nz-form-label [nzSpan]="2" nzFor="rate">学校</nz-form-label>
            <nz-form-control [nzSpan]="6">
              <app-school-select style="width:100%" name="schooldto" [(ngModel)]="schooldiD"></app-school-select>
            </nz-form-control>

            <!-- <nz-form-label [nzSpan]="2" nzFor="rate">专业</nz-form-label>
            <nz-form-control [nzSpan]="6">
              <app-major-select style="width:100%"></app-major-select>
            </nz-form-control> -->

            <nz-form-control [nzSpan]="6" [nzPush]="2">
              <button nz-button (click)="serach()" [nzType]="'primary'">
                <i nz-icon nzType="search"></i>
                <span>搜索</span>
              </button>
            </nz-form-control>
          </nz-form-item>
        </form>
      </div>
    </nz-card>
  </as-split-area>
  <as-split-area [size]="'*'">
    <nz-spin [nzSpinning]="spinning" style="padding: 10px;">
      <nz-card [nzHoverable]="true" s [nzBordered]="false">
        <div style="height: 100%;overflow-x: hidden;overflow-y: auto">
          <ng-container *ngFor="let item of tableData">
            <sv-container labelWidth="150">
              <sv label="学校名称">{{ item.name }}</sv>
              <sv label="所在国家">{{ item.country }}</sv>
              <sv label="地址">{{ item.detailed_address }} </sv>
              <sv col="1" label="拥有专业">
                <nz-tag *ngFor="let major of item.majors">{{ major.name }}</nz-tag>
              </sv>
              <sv col="1" label="基本介绍">{{ item.essential_information }}</sv>
              <sv col="1" label="操作" type="danger">
                <ng-container *ngIf="!item.status">
                  <button (click)="shenqing(item)" nz-button nzType="primary">申请</button>
                </ng-container>

                <ng-container *ngIf="item.status === 'APPLYING'">
                  <button nz-button nzType="primary" disabled="true">申请中</button>

                  <button nz-button nzType="primary" (click)="updateShenqing(item)">修改申请</button>
                </ng-container>

                <ng-container *ngIf="item.status === 'APPLYED'">
                  <button nz-button nzType="primary" disabled="true">申请通过</button>
                </ng-container>

                <ng-container *ngIf="item.status === 'APPLYBACK'">
                  <button nz-button nzType="primary" disabled="true">申请退回</button>
                  <button (click)="shenqing(item)" nz-button nzType="primary">重新申请</button>
                </ng-container>
              </sv>
            </sv-container>
            <nz-divider></nz-divider>
          </ng-container>
        </div>
      </nz-card>
    </nz-spin>
  </as-split-area>
</as-split>

<app-messages-detail #messagesDetailComponent (notification)="notify($event)"></app-messages-detail>
